home *** CD-ROM | disk | FTP | other *** search
/ Time Warp / Time Warp.iso / pc / timewarp / mars2.dxr / 00142.ls < prev    next >
Encoding:
Text File  |  1997-06-05  |  1.4 KB  |  66 lines

  1. on comet1
  2.   set a to random(10)
  3.   if a = 1 then
  4.     puppetSound("COMET.AIF")
  5.     updateStage()
  6.   else
  7.     if a = 2 then
  8.       puppetSound("COMET2.AIF")
  9.       updateStage()
  10.     else
  11.       exit
  12.     end if
  13.   end if
  14.   puppetSprite(8, 1)
  15.   set xloc to random(640)
  16.   set yloc to 0
  17.   set the locH of sprite 8 to xloc
  18.   set the locV of sprite 8 to yloc
  19.   set vector to random(80)
  20.   set Ncolor to random(16)
  21.   set the foreColor of sprite 8 to Ncolor
  22.   repeat with r = 0 to vector
  23.     set xloc to xloc + (xloc / vector)
  24.     set yloc to r
  25.     set the locH of sprite 8 to xloc
  26.     set the locV of sprite 8 to yloc
  27.     updateStage()
  28.   end repeat
  29.   set the locV of sprite 8 to 100
  30.   updateStage()
  31.   puppetSprite(8, 0)
  32. end
  33.  
  34. on comet2
  35.   set a to random(10)
  36.   if a = 1 then
  37.     puppetSound("COMET.AIF")
  38.     updateStage()
  39.   else
  40.     if a = 2 then
  41.       puppetSound("COMET2.AIF")
  42.       updateStage()
  43.     else
  44.       exit
  45.     end if
  46.   end if
  47.   puppetSprite(9, 1)
  48.   set xloc to random(640)
  49.   set yloc to 0
  50.   set the locH of sprite 9 to xloc
  51.   set the locV of sprite 9 to yloc
  52.   set vector to random(80)
  53.   set Ncolor to random(16)
  54.   set the foreColor of sprite 9 to Ncolor
  55.   repeat with r = 0 to vector
  56.     set xloc to xloc - (xloc / vector)
  57.     set yloc to r
  58.     set the locH of sprite 9 to xloc
  59.     set the locV of sprite 9 to yloc
  60.     updateStage()
  61.   end repeat
  62.   set the locV of sprite 9 to 100
  63.   updateStage()
  64.   puppetSprite(9, 0)
  65. end
  66.